An electronic device having a universal serial bus (USB) host function has been known. Such an electronic device can supply electric power to another electronic device. When two electronic devices having the USB host function are connected through a USB, an electric power transmission side and an electric power reception side of the two electronic devices can be interchanged so long as they have a role swapping function.